package io.github.burukeyou.dataframe.iframe.item;

import java.util.Objects;

/**
 * DataFrame （3 x 3 矩阵）
 * @param <T1>
 * @param <T2>
 * @param <T3>
 *
 * @author caizhihao
 */
public class FI3<T1, T2, T3> implements FItem {
    private T1 c1;
    private T2 c2;
    private T3 c3;

    public FI3() {
    }

    public FI3(T1 c1, T2 c2, T3 c3) {
        this.c1 = c1;
        this.c2 = c2;
        this.c3 = c3;
    }

    public T1 C1() {
        return c1;
    }

    public T2 C2() {
        return c2;
    }

    public T3 C3() {
        return c3;
    }

    public T1 getC1() {
        return c1;
    }

    public void setC1(T1 c1) {
        this.c1 = c1;
    }

    public T2 getC2() {
        return c2;
    }

    public void setC2(T2 c2) {
        this.c2 = c2;
    }

    public T3 getC3() {
        return c3;
    }

    public void setC3(T3 c3) {
        this.c3 = c3;
    }

    @Override
    public boolean equals(Object o) {
        if (o == null || getClass() != o.getClass()) return false;

        FI3<?, ?, ?> fi3 = (FI3<?, ?, ?>) o;
        return Objects.equals(c1, fi3.c1) && Objects.equals(c2, fi3.c2) && Objects.equals(c3, fi3.c3);
    }

    @Override
    public int hashCode() {
        int result = Objects.hashCode(c1);
        result = 31 * result + Objects.hashCode(c2);
        result = 31 * result + Objects.hashCode(c3);
        return result;
    }
}
